<%@page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="s2jsp.bysj.entity.Product"%>
<%@page import="s2jsp.bysj.biz.*"%>
<%
	int productId = 0;
	//获取商品Id
	if (request.getParameter("productId") != null) {
		productId = Integer.parseInt(request.getParameter("productId"));
	}
	ProductBiz productBiz = new ProductBiz();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>商品详细信息</title>
		<link rel="stylesheet" type="text/css" href="css/base.css" />
		<link rel="stylesheet" type="text/css" href="css/productList.css" />
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="js/showWeb.js"></script>
	</head>

	<body>
		<%
			if (productId != 0) {
				Product product = productBiz.findProductByProductId(productId);
		%>
		<table class="outTable" style="width: 500px; padding: 0px; margin: 0">
			<tr>
				<td class="productImgTd" style="height: 93px; width: 120px">
					<img src="image/<%=product.getPicture()%>"
						style="height: 93px; width: 120px" />
				</td>

				<td>
					<table class="inTable"
						style="border-collapse: collapse; border: 1px solid #ccc; height: 60px;">
						<tr>
							<td class="infoTitle">
								商品编号
							</td>
							<td><%=product.getSerialNumber()%></td>
						</tr>
						<tr>
							<td class="infoTitle">
								商品名称
							</td>
							<td><%=product.getName()%></td>
						</tr>
						<%--商品品牌 --%>
						<tr>
							<td class="infoTitle">
								商品品牌
							</td>
							<td><%=product.getBrand()%></td>
						</tr>
						<tr>
							<td class="infoTitle">
								商品型号
							</td>
							<td><%=product.getType()%></td>
						</tr>

						<tr>
							<td class="infoTitle">
								商品价格
							</td>
							<td><%=product.getPrice()%></td>
						</tr>

						<tr>
							<td class="infoTitle">
								商品介绍
							</td>
							<td>
								<%=product.getDescription()%>
							</td>
						</tr>
					</table>
				</td>

			</tr>
		</table>
		<%
			} else {
		%>
		<p>
			无商品详细信息
		</p>
		<%
			}
		%>
	</body>

</html>
